﻿using System;
using Word = Microsoft.Office.Interop.Word;

namespace Linn {
    public abstract class TemplateBase : ITemplate {
        protected TemplateBase(Word.Template template) {
            if(template == null) {
                throw new ArgumentNullException("template");
            }

            Template = template;
            Parameters = new ParameterCollection();
            LoadParameters();
        }

        protected Word.Template Template { get; private set; }

        public string FullName { get { return Template.FullName; } }

        public string Name { get { return Template.Name; } }

        public ParameterCollection Parameters { get; private set; }

        protected abstract void LoadParameters();
    }
}
